#pragma once

#include "IPageChangeHooker.h"
#include "PatchingUtils.h"


class TF2DHooker: public IPageChangeHooker
{
public:
	 virtual void Hook(PageChangeCallbackFn pageChangeCallback);
	 virtual void UnHook();
	 virtual void Initialize(Logger* logger, TODAYTABSETTINGS* settings);
	 virtual HWND GetManilaWindow();
	 static TF2DHooker* get_Instance();

private:
	void OutputDebugStringWSubst(LPCWSTR lpszFmt);
	static void StaticOutputDebugStringWSubst(LPCWSTR lpszFmt);
	TF2DHooker();

private:
	static TF2DHooker* _instance;

	bool wasEndPageLoad;
	DWORD callOutputDebugStringWOrg;

	PageChangeCallbackFn _callback;
};